// https://nuxt.com/docs/api/configuration/nuxt-config
import AutoImport from 'unplugin-auto-import/vite'
import { NaiveUiResolver } from 'unplugin-vue-components/resolvers'
import Components from 'unplugin-vue-components/vite'
import tailwindcss from "@tailwindcss/vite";
export default defineNuxtConfig({
  app: {
    pageTransition: { name: 'page', mode: 'default' },
    layoutTransition: {name: 'layout',mode: 'out-in'},
    head: {
      title: 'atian的小屋',
      meta: [
        { charset: 'utf-8' },
        { name: 'viewport', content: 'width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no, shrink-to-fit=no' },
        { name: 'atian的小屋', content: 'atian的知识空间' },
        {name:'keywords', content:"atian,博客,知识分享,生活分享,个人博客,web,前端,后端,生活,技术,算法,笔记,vue,react,nuxt,css,html,js,ts"},
        {name:'description', content:"atian的知识空间，一个分享web解决方法、技术、生活的个人博客"},
        {property: 'og:title',content: 'atian的小屋'},
        {property: 'og:description',content: 'atian的小屋，知识博客、生活的小窝；你走走听听，驻足查看，我给你一片繁花；分享知识、分享生活、聊点八卦'},
        {property: 'og:type',content: 'website'},
        {property: 'og:url',content: 'https://atian.work'},
        {property: 'og:image',content: 'https://file.atian.work/msedge_bHDzEiTYr5.gif'},
        {property: 'og:site_name',content: 'atian的小屋'},
      ],
      link: [{ rel: 'icon', type: 'image/x-icon', href: 'favicon.ico' }],
      style: [],
      script: [],
      noscript: []
    },
  },
  sourcemap: {
    server: true,
    client: false
  },
  ssr:true,
  css: ['~/assets/styles/index.scss'],
  compatibilityDate: '2024-11-01',
  devtools: { enabled: false },
  modules: ['@vuesax-alpha/nuxt',
    '@hypernym/nuxt-gsap', '@nuxtjs/tailwindcss',
      'nuxtjs-naive-ui','@vueuse/motion/nuxt','@nuxt/image','@vueuse/nuxt',],
  gsap: {
    composables: true,
    extraPlugins:{
      scrollTrigger: true
    }
  },
  vuesaxAlpha: {
    themes: ['dark'],
  },
  runtimeConfig: {
    // bingUrl: 'https://wallpaperApi.atian.work',
    public: {
      bingUrl: 'https://bing.biturl.top',
      weatherPage: 'https://weather.atian.work/#/today?external=1',
      serviceUrl: 'http://127.0.0.1:9527/atianHome'
    },
    motion: {
      directives: {
        'pop-bottom': {
          initial: {
            scale: 0,
            opacity: 0,
            y: 100,
          },
          visible: {
            scale: 1,
            opacity: 1,
            y: 0,
          }
        }
      }
    }
  },
  typescript: {
    typeCheck:false,
  },
  build:{
    transpile: ['vueuc']
  },
  vite: {
    plugins: [
      tailwindcss(),
      AutoImport({
        imports: [
          {
            'naive-ui': [
              'useDialog',
              'useMessage',
              'useNotification',
              'useLoadingBar'
            ]
          }
        ]
      }),
      Components({
        resolvers: [NaiveUiResolver()]
      })
    ]
  }
})